//
//  TPBaseViewController.m
//  TPHelper
//
//  Created by xuqiang on 2020/7/23.
//  Copyright © 2020 xuqiang. All rights reserved.
//

#import "TPBaseViewController.h"
#import <Toast/Toast.h>

@interface TPBaseViewController ()

@end

@implementation TPBaseViewController

- (void)back {
    
    [self.navigationController popViewControllerAnimated:YES];
    
    
}
- (void)showToast:(NSString *)msg {
    [self.view makeToast:msg duration:1 position:[CSToastManager defaultPosition]];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.edgesForExtendedLayout = UIRectEdgeNone;

    [UIScrollView appearance].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; //iOS11 解决SafeArea的问题，同时能解决pop时上级页面scrollView抖动的问题
    self.navigationController.interactivePopGestureRecognizer.delegate = (id)self;

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
